package com.sixth.controller;

import com.sixth.entity.Dept;
import com.sixth.entity.Goods;
import com.sixth.service.WelcomeService;
import com.sixth.util.LayTab;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: project01
 * @description:
 * @author: 老范
 * @create: 2021-12-27 14:32
 **/
@RestController
@RequestMapping("welcome")
public class WelcomeController {
    @Autowired
    public WelcomeService welcomeService;
    //各部门员工
    @RequestMapping("bing")
    public LayTab bing(Dept dept) {
        return welcomeService.bing(dept);
    }
    //获取售价
    @RequestMapping("sprice")
    public LayTab sprice(Goods goods) {
        return welcomeService.sprice(goods);
    }
    //获取数量
    @RequestMapping("counts")
    public LayTab counts(Goods goods) {
        return welcomeService.counts(goods);
    }
    /*获取店铺总数*/
    @RequestMapping("BranchCount")
    public Integer BranchCount() {
        return welcomeService.BranchCount();
    }
    /*获取所在店铺人数*/
    @RequestMapping("StaffCount")
    public Integer StaffCount() {
        return welcomeService.StaffCount();
    }
    /*获取所在店铺商品类型总数*/
    @RequestMapping("GoodsCount")
    public Integer GoodsCount() {
        return welcomeService.GoodsCount();
    }
}

